//
//  UIImage+Image.m
//  微博
//
//  Created by Clement_Gu on 16/4/8.
//  Copyright © 2016年 小白. All rights reserved.
//

#import "UIImage+Image.h"

@implementation UIImage (Image)
//图片初始化带原图
+(instancetype)imageWithOriginalName:(NSString *)name
{
    UIImage *image = [UIImage imageNamed:name];
    return  [image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];

}

+(instancetype)imageWithStretchableName:(NSString *)imageName
{
    UIImage *image = [UIImage imageNamed:imageName];
    //图片拉伸将图片的中心点横竖两条线拉伸成面
    return [image stretchableImageWithLeftCapWidth:image.size.width*0.5 topCapHeight:image.size.height*0.5];


}


@end
